using System;
using System.Collections.Generic;
using System.Text;
using System.ComponentModel;
using System.ComponentModel.Design;
using System.ComponentModel.Design.Serialization;
using System.Drawing;
using System.Drawing.Design;
using System.Data;
using System.Windows.Forms;
using System.IO;
using DesignSurfaceExt;
using System.Diagnostics;
namespace Loader
{
   public class Loaders
    {
       public Loaders()
       {

       }
       public BasicHostLoader LoaderPrj(IDesignSurfaceExt isurf, string sPath)
       {

          // IDesignerHost host = (IDesignerHost)isurf.GetIDesignerHost().GetService(typeof(IDesignerHost));
           DesignSurface surface=isurf.GetDesignSurface();
           BasicHostLoader basicHostLoader = new BasicHostLoader(sPath, false);
           surface.BeginLoad(basicHostLoader);
           return basicHostLoader;
       }
       public BasicHostLoader LoadPrjRun(IDesignSurfaceExt isurf, string sPath)
       {
           DesignSurface surface = isurf.GetDesignSurface();
           BasicHostLoader basicHostLoader = new BasicHostLoader(sPath, true);
           surface.BeginLoad(basicHostLoader);
           return basicHostLoader;
       }
    }
    	
}
